<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>销售历史</title>
	<include file="Public:header" />
	<style type="text/css">
		.input{width:100px;border:1px solid #ccc;padding:2px;}
	</style>
	<script type="text/javascript">
		var actflg="{:C('URL_MODEL')}"=="0"?"&":"?";

		function selectall_todo()
		{
			$("input[name='chk_list']").attr("checked",true);
		}
		function selectall_undo()
		{
			$("input[name='chk_list']").attr("checked",false);
		}
		$(document).ready(function(){
			$('#misone_list_table').datagrid({
				//url: '///',
				//title: 'DataGrid',
				//width: 800,
				//height: 220,
				fitColumns: true,
				nowrap:true,
				rownumbers:true,
				showFooter:false,
				columns:[[
					{field:'col01',title:'日期',width:80},
					{field:'col02',title:'单号',width:100},
					{field:'col03',title:'客户',width:100}, //
					{field:'col04',title:'商品',width:100},
                    {field:'col13',title:'规格',width:80},
					{field:'col05',title:'单位',width:40},
					{field:'col06',title:'仓库',width:50},
					{field:'col07',title:'货币',width:50},
					{field:'col08',title:'数量',width:50,align:'right'},
					{field:'col09',title:'单价',width:50,align:'right'},
					{field:'col10',title:'税率%',width:40,align:'right'},
					{field:'col11',title:'折扣%',width:40,align:'right'},
					{field:'col12',title:'金额',width:50,align:'right'}
				]]
			});
		});
	</script>
</head>
<body class="">
	<div class="demo-info space-out-5px">
		<div class="demo-tip icon-tip"></div>
		<div>销售历史</div>
		<div>
		<form id="frm_search" method="post" action="{:U('Sales/sales_history')}" style="margin:10px auto 0px 25px;">
		
		<div style="width:100%; height:25px;">
		
		<div class="list-t-l w60px">单据类型：</div>
		<div class="list-t-l w120px">
			<select id="mas_code" name="mas_code" class="easyui-combobox" editable="false" style="width:120px;">
								<option value=''>选择单据类型</option>								
								<option value='SO'>SO-销售单</option>
								<option value='RNC'>RNC-销售退货单</option>
			</select>
			<script type="text/javascript">$("#mas_code").attr("value","{$mas_code}");</script>
		</div>
		
		<div class="list-t-l w60px">日期(从)：</div>
		<div class="list-t-l w120px"><input type="text" id="mas_fadate1" name="mas_fadate1" class="easyui-datebox"  editable="false" value="{$mas_fadate1}" style="width:100px;" /></div>
		
		<div class="list-t-l w60px">客户：</div>
		<div class="list-t-l w120px"><input type="text" id="acc_title" name="acc_title" class="input" value="{$acc_title}" /></div>
		
		<div class="list-t-l w60px">仓库：</div>
		<div class="list-t-l w120px"><input type="text" id="wh_title" name="wh_title" class="input" value="{$wh_title}" /></div>
		
		</div>
		
		<div style="height:3px; clear:both;"></div>
		
		<div style="width:100%; height:25px;">
		
		<div class="list-t-l w60px">单号：</div>
		<div class="list-t-l w120px"><input type="text" id="mas_no" name="mas_no" class="input" value="{$mas_no}" /></div>
		
		
		<div class="list-t-l w60px">日期(到)：</div>
		<div class="list-t-l w120px"><input type="text" id="mas_fadate2" name="mas_fadate2" class="easyui-datebox"  editable="false" value="{$mas_fadate2}" style="width:100px;" /></div>
		
		<div class="list-t-l w60px">商品：</div>
		<div class="list-t-l w120px"><input type="text" id="stk_title" name="stk_title" class="input" value="{$stk_title}" /></div>
		
		<div class="list-t-l w60px"></div>
		<div class="list-t-l w120px"><a href="javascript:;" class="easyui-linkbutton" iconCls="icon-search" onclick="$('#frm_search').submit();">搜索</a></div>
		
		</div>
		
		
		</form>
		</div>
	</div>
	<div class="list-box space-out-5px">
	
	<table id="misone_list_table"><tbody>
	<volist name="datalist" id="datalist">
	<tr>		
		<td field="col01">{$datalist.mas_fadate|date='Y-m-d',###}</td>
		<td field="col02"><a href="javascript:;" onclick="parent.addTab('单据追踪({$datalist.mas_code}#{$datalist.mas_no})','{:U('Sales/'.strtolower($datalist['mas_code']).'_edit?id='.$datalist['masid'].'')}');">{$datalist.mas_code}-{$datalist.mas_no}</a></td>
		<td field="col03"><span  alt="{$datalist.customer_title}" title="{$datalist.customer_title}">{$datalist.customer_title}</span></td>
		<td field="col04"><span  alt="{$datalist.stk_code} {$datalist.stk_title}" title="{$datalist.stk_code} {$datalist.stk_title}">{$datalist.stk_code} {$datalist.stk_title}</span></td>
		<td field="col13">{$datalist.spec}</td>
        <td field="col05">{$datalist.stk_uom}</td>
		<td field="col06">{$datalist.wh_title}</td>
		<td field="col07">{$datalist.curr_code} {$datalist.curr_rate}</td>
		<td field="col08">{$datalist.qty|get_round=###,6}</td>
		<td field="col09">{$datalist.price|get_round=###,6}</td>
		<td field="col10">{$datalist.tax_rate|get_round=###,2}</td>
		<td field="col11">{$datalist.disc_rate|get_round=###,2}</td>
		<td field="col12">{$datalist.amount2|get_round=###}</td>
	</tr>
	</volist>
	</tbody></table>
	
	<div style="height:5px; clear:both;"></div>
	
	</div>
	
	
	<div class="space-out-5px">
	
	<div class="list-title">
		<div class="list-t-l">总计数量：{$datasum.qty|get_round=###}</div>
		<div class="list-t-l w30px"></div>
		<div class="list-t-l">总计金额(本位币)(未税)：{$datasum.amount1|get_round=###}</div>
		<div class="list-t-l w30px"></div>
		<div class="list-t-l">总计金额(本位币)(含税)：{$datasum.amount2|get_round=###}</div>
		<div class="list-t-r"></div>
	</div>
	
	
	</div>
	
	<div class="demo-info space-out-5px">
		<div class="demo-tip icon-tip"></div>
		<div class="pages">&nbsp;{$page}</div>
	</div>
</body>
</html>
